<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>cors</title>
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
    <button class="btn">发送ajax请求</button>
</body>
</html>
<script>
$('.btn').on('click', () => {
    $.ajax({
        url: 'http://127.0.0.1/getusers',
        success (res) {
            console.log(res)
        }
    })
})
</script>